home *** CD-ROM | disk | FTP | other *** search
/ Champak 40 / Vol 40.iso / games / super_su.swf / scripts / DefineSprite_213 / frame_1 / DoAction.as
Encoding:
Text File  |  2007-04-19  |  874 b   |  40 lines

  1. function mSelect(aStrChar)
  2. {
  3.    this._parent.mSetCharacter(aStrChar);
  4.    this._parent.mJumpLevel();
  5. }
  6. function mPreSelect(astrchar)
  7. {
  8.    this[this.preselected].gotoAndPlay(11);
  9.    this.preselected = astrchar;
  10.    this[astrchar].gotoAndPlay(2);
  11. }
  12. function mPressLeft()
  13. {
  14.    this.intindex--;
  15.    if(this.intindex < 0)
  16.    {
  17.       this.intindex = this.arrChars.length - 1;
  18.    }
  19.    this.mPreSelect(this.arrChars[this.intindex]);
  20. }
  21. function mPressRight()
  22. {
  23.    this.intindex = this.intindex + 1;
  24.    if(this.intindex >= this.arrChars.length)
  25.    {
  26.       this.intindex = 0;
  27.    }
  28.    this.mPreSelect(this.arrChars[this.intindex]);
  29. }
  30. function mPressSpaceBar()
  31. {
  32.    this.mSelect(this.preselected);
  33. }
  34. this.defaultchar = "bl";
  35. this.intindex = 2;
  36. this.arrChars = new Array();
  37. this.arrChars.push("bb");
  38. this.arrChars.push("bc");
  39. this.arrChars.push("bl");
  40.